<?php
/********************************************************
 *
 * 此文件的作用:
 *		包括勤助正式员工的所有操作
 *
 * @copyright Copyright (c) 2008-2009
 * @author 刘昌功 lcg635@126.com
 *
 ********************************************************/
defined('APP_DIR') or header("HTTP/1.0 404 Not Found");

FLEA::loadClass('Common_Model');

class Model_Process extends Common_Model {

	function __construct() {
		parent::__construct();
		$this->_tb = FLEA::getSingleton('Table_Process');
	}
	
	
	function getList($uid = null) {
		$result = $this->_tb->findAll(
				array('user_id' => $uid ),
				'process_id'
				);
		return $result;
	}
	
	function getForm($data = null) {
		$form = $this->_tb->form($data);
		return $form;
	}
	
	function delProcess($process_id = null) {
		$query = "delete FROM `process` WHERE `process_id`=$process_id";
		return $result = $this->_tb->execute($query);
	}
	
	function addProcess($data) {
		return $result = $this->_tb->create($data);
	}
}	